Repository navigation
Fix Cap’n Proto maps with scalar and enum values - #748
Merged
liuzicheng1987 merged 1 commit intoOct 19, 2026
Merged
liuzicheng1987 merged 1 commit into
liuzicheng1987 merged 1 commit into
Conversation
liuzicheng1987
merged commit Oct 19, 2026
6e8a406
into
munich-data-engineering:main
176 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Serializing a struct containing
std::map<std::string, int>(or an unordered map with scalar values) fails during schema generation:Map(Int32)uses a scalar as a Cap’n Proto generic argument, which must be a pointer type. Enum-valued maps fail for the same reason, even when the map is empty.Generate concrete map structs for scalar and enum values, with the value stored directly in each entry. Retain the existing generic
Map(Value)schema for pointer-valued maps, so their generated schema and reader/writer paths stay unchanged.Regression coverage checks empty and populated ordered/unordered maps, signed/unsigned 64-bit boundaries, booleans, floating-point values, enums, literals, and mixed/nested maps alongside string/list/optional values.
Validation: Release build with Clang and Cap’n Proto 1.1.0; all 59 Cap’n Proto CTest checks passed (58 runtime tests plus the compile regression).